public class Test {
    public static void main(String[] args) {
        SingleLinkedList singleLinkedList = new SingleLinkedList();//不初始化了 默认就是null
        singleLinkedList.addFirst(1);
        singleLinkedList.addFirst(2);
        singleLinkedList.addFirst(2);
        singleLinkedList.addFirst(3);
        singleLinkedList.addFirst(3);
        singleLinkedList.display();
        System.out.println("==========================");
//
//        singleLinkedList.remove(2);
//        singleLinkedList.display();
//        System.out.println("==========================");

        singleLinkedList.removeAllKey(3);
        singleLinkedList.display();
        System.out.println("==========================");
        System.out.println(singleLinkedList.size());
    }
    public static void main1(String[] args) {
        SingleLinkedList singleLinkedList = new SingleLinkedList();//不初始化了 默认就是null
        singleLinkedList.addFirst(1);
        singleLinkedList.addFirst(2);
        singleLinkedList.addFirst(3);
        singleLinkedList.display();
        System.out.println("==========================");
//        singleLinkedList.addLast(3);
//        singleLinkedList.display();
//        System.out.println("==========================");
//
//        singleLinkedList.addIndex(2,88);
//        singleLinkedList.display();
//        System.out.println("==========================");

        if (singleLinkedList.contains(2)){
            System.out.println("666666666666666666666666666");
        }


    }

}
